TRANSDUCER_RADIUS=8.25;
PIPE_RADIUS=17;
PIPE_LENGTH=88;
CHANNEL_WIDTH=15;
CHANNEL_HEIGHT=24;
ULTRASONIC_ANGLE=50;
ULTRASONIC_LENGTH=40;

union(){
difference(){
    
    union(){
    	translate ([0, 0, -25]) 
        rotate([0, 0, 0])
   		cylinder (h = PIPE_LENGTH, r = PIPE_RADIUS);
                
        translate ([-(PIPE_RADIUS+9), .1, -14.9]) 
        rotate([0, ULTRASONIC_ANGLE, 0])
   		cylinder (h = ULTRASONIC_LENGTH, r = TRANSDUCER_RADIUS+2);

        translate ([-(PIPE_RADIUS+9), .1, 49.9]) 
        rotate([0, 180-ULTRASONIC_ANGLE, 0])
   		cylinder (h = ULTRASONIC_LENGTH, r = TRANSDUCER_RADIUS+2);

    }
    
    union(){     
        translate ([-(CHANNEL_HEIGHT/2), -CHANNEL_WIDTH/2, -25]) 
        rotate([0, 0, 0])
   		cube ([CHANNEL_HEIGHT,CHANNEL_WIDTH,PIPE_LENGTH]);    
  
        translate ([-(PIPE_RADIUS+9), 0, -15]) 
        rotate([0, ULTRASONIC_ANGLE, 0])
   		cylinder (h = ULTRASONIC_LENGTH, r = TRANSDUCER_RADIUS);
        
        translate ([-(PIPE_RADIUS+9), 0, 50]) 
        rotate([0, 180-ULTRASONIC_ANGLE, 0])
   		cylinder (h = ULTRASONIC_LENGTH, r = TRANSDUCER_RADIUS);
    }
 
}
union(){
        translate ([-(CHANNEL_HEIGHT/2), -CHANNEL_WIDTH, -15]) 
        rotate([0, 0, 0])
   		cube ([CHANNEL_HEIGHT,CHANNEL_WIDTH/2,PIPE_LENGTH-20]);

        translate ([-(CHANNEL_HEIGHT/2), CHANNEL_WIDTH/2, -15]) 
        rotate([0, 0, 0])
   		cube ([CHANNEL_HEIGHT,CHANNEL_WIDTH/2,PIPE_LENGTH-20]);
    


// Collimating Elements
    
        translate ([-(CHANNEL_HEIGHT/2), -.25, -25]) 
        rotate([0, 0, 0])
   		cube ([CHANNEL_HEIGHT,.8,PIPE_LENGTH]);

        translate ([-(CHANNEL_HEIGHT/2), -(CHANNEL_WIDTH/4)-.5, -25]) 
        rotate([0, 0, 0])
   		cube ([CHANNEL_HEIGHT,.8,PIPE_LENGTH]);

        translate ([-(CHANNEL_HEIGHT/2), (CHANNEL_WIDTH/4)-.25, -25]) 
        rotate([0, 0, 0])
  		cube ([CHANNEL_HEIGHT,.8,PIPE_LENGTH]);


// Flow plates
 
// Lower Plate
        translate ([-(CHANNEL_HEIGHT/2)-1, -CHANNEL_WIDTH/2, -25]) 
        rotate([0, 0, 0])
   		cube ([1,CHANNEL_WIDTH,14]);
        
// Middle Plate        
        translate ([-(CHANNEL_HEIGHT/2)-1, -CHANNEL_WIDTH/2, 3]) 
        rotate([0, 0, 0])
   		cube ([1,CHANNEL_WIDTH,29]);
        
// Top Plate       
        translate ([-(CHANNEL_HEIGHT/2)-1, -CHANNEL_WIDTH/2, PIPE_LENGTH-42]) 
        rotate([0, 0, 0])
   		cube ([1,CHANNEL_WIDTH,10]);

}
}
